Optimal. Leaf size=159 \[ \frac {\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 159, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3647, 3711,
12, 3609, 3620, 3618, 65, 214} \begin {gather*} -\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}+\frac {\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 65
Rule 214
Rule 3609
Rule 3618
Rule 3620
Rule 3647
Rule 3711
Rubi steps
\begin {align*} \int \tan ^3(c+d x) \sqrt {a+b \tan (c+d x)} \, dx &=\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}+\frac {2 \int \sqrt {a+b \tan (c+d x)} \left (-a-\frac {5}{2} b \tan (c+d x)-a \tan ^2(c+d x)\right ) \, dx}{5 b}\\ &=-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}+\frac {2 \int -\frac {5}{2} b \tan (c+d x) \sqrt {a+b \tan (c+d x)} \, dx}{5 b}\\ &=-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\int \tan (c+d x) \sqrt {a+b \tan (c+d x)} \, dx\\ &=-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\int \frac {-b+a \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\\ &=-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\frac {1}{2} (-i a-b) \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx-\frac {1}{2} (i a-b) \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\\ &=-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}-\frac {(a-i b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac {(a+i b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}\\ &=-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}+\frac {(i a-b) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}-\frac {(i a+b) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}-\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {4 a (a+b \tan (c+d x))^{3/2}}{15 b^2 d}+\frac {2 \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{5 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.12, size = 140, normalized size = 0.88 \begin {gather*} \frac {15 \sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )+15 \sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )+\frac {2 \sqrt {a+b \tan (c+d x)} \left (-2 a^2-15 b^2+a b \tan (c+d x)+3 b^2 \tan ^2(c+d x)\right )}{b^2}}{15 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(369\) vs.
\(2(133)=266\).
time = 0.14, size = 370, normalized size = 2.33
method | result | size |
derivativedivides | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-\frac {2 a \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-2 b^{2} \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (\sqrt {a^{2}+b^{2}}-a \right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (-b \tan \left (d x +c \right )-a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (a -\sqrt {a^{2}+b^{2}}\right ) \arctan \left (\frac {-2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{b^{2} d}\) | \(370\) |
default | \(\frac {\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5}-\frac {2 a \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3}-2 b^{2} \sqrt {a +b \tan \left (d x +c \right )}+2 b^{2} \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (\sqrt {a^{2}+b^{2}}-a \right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (-b \tan \left (d x +c \right )-a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-\sqrt {a^{2}+b^{2}}\right )}{8}+\frac {\left (a -\sqrt {a^{2}+b^{2}}\right ) \arctan \left (\frac {-2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{2 \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{b^{2} d}\) | \(370\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1879 vs.
\(2 (129) = 258\).
time = 1.58, size = 1879, normalized size = 11.82 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \tan {\left (c + d x \right )}} \tan ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.49, size = 354, normalized size = 2.23 \begin {gather*} \left (\frac {2\,a^2}{b^2\,d}-\frac {2\,\left (a^2+b^2\right )}{b^2\,d}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+\frac {2\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{5/2}}{5\,b^2\,d}-\frac {2\,a\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{3/2}}{3\,b^2\,d}+\mathrm {atan}\left (\frac {b^4\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}+\frac {32\,a\,b^3\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a-b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {b^4\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}-\frac {32\,a\,b^3\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a+b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________